package com.ruan.dao;

import com.ruan.entity.Goods;
import com.ruan.query.GoodsQuery;
import com.ruan.vo.GoodsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName:GoodsMapper
 * @Author:阮昇
 * @Description:
 * @Datetime: 2023/7/1 18:26
 **/
@Repository
public interface GoodsMapper {
    Goods getGoodsByName(String goodsName);

    int addGoods(Goods goods);

    void deleteGoodsByTypeId(Integer id);

    List<GoodsVo> getGoodsList(GoodsQuery goodsQuery);

    int editGoods(Goods goods);

    int deleteGoods(@Param("id") Integer id,@Param("currentTime") String currentTime);

    int deleteGoodsByIds(@Param("ids") Integer[] ids,@Param("currentTime") String currentTime);

    GoodsVo getGoodsById(Integer id);

    void addSales(@Param("id") Integer id,@Param("count") Integer count);
}
